/**
 * 用户个人信息修改视图
 */
Ext.define('app.view.staff.Edit',{
	extend:'Ext.window.Window',
	alias:'widget.staffedit',
	title:'编辑信息',
	id:'staffEdit',
	modal : true,
	bodyPadding:5,
	width:430,
	items:{
		xtype:'form',
		margin:5,
		defaultType:'textfield',
		defaults:{		//表单默认属性
			labelSeparator : ": ",
			labelWidth : 80,
			width : 320,
			allowBlank : false,	//表单不为空
			msgTarget : 'side',
			labelAlign:'right',	//标签右对齐
			blankText : '不能为空' ,
		},
		border:false,
		items:[
		       {xtype:'textfield',name:'name',fieldLabel:'姓名',},
		       {xtype:'textfield',name:'ename',fieldLabel:'英文名',readOnly:true,},
		       {xtype:'hidden',name:'photo'},
	   	       {
			   	   xtype:'filefield',name:'photo1',
			   	   fieldLabel:'头像', buttonText: '选择图片...',labelSeparator : ": ",
			   	   emptyText :'请选择上传的图片',
			   	
	   	       },
		       {
		    	   xtype : 'fieldcontainer',defaultType: 'radiofield',name:'sex',fieldLabel:'性别',defaults: {
	                flex: 0
	            },layout: 'hbox',
	            items: [
	                    {
	                        boxLabel  : '男',
	                        name      : 'sex',
	                        inputValue: 1,
	                        id        : 'male'
	                    }, {
	                        boxLabel  : '女',
	                        name      : 'sex',
	                        inputValue: 0,
	                        id        : 'female'
	                    },
	                ]
		       },		       
		       {
		    	   xtype:'numberfield',
		    	   name:'age',
		    	   fieldLabel:'年龄',
		    	   value: 25,
		           maxValue: 99,
		           minValue: 1,
		           editable: false,
		    	},
		       {xtype:'textfield',name:'address',fieldLabel:'地址',},
		       {
		    	   xtype:'combo',
		    	   name:'department',
		    	   fieldLabel:'部门',
		    	   queryMode: 'remote',
			       store: 'dept.SelectStore',				       
			       displayField: 'name',
			       valueField: 'id',
			   },
		       {xtype:'datefield',name:'birthday',fieldLabel:'生日',format : 'Y-m-d',allowBlank:true,},		       
		       {xtype:'textfield',name:'sid',fieldLabel:'工号',},
		       {xtype:'textfield',name:'tel',fieldLabel:'电话',},
		       {xtype:'textfield',name:'email',fieldLabel:'邮箱',},
		       {
		    	   xtype:'combo',
		    	   name:'area',
		    	   fieldLabel:'户籍',
		    	   queryMode: 'remote',
			       store: 'AreaSelectStore',
			       
			       displayField: 'name',
			       valueField: 'area',
			   },			       
		       {xtype:'datefield',name:'stime',fieldLabel:'入职时间',format : 'Y-m-d',allowBlank:true,},
		       {xtype:'datefield',name:'etime',fieldLabel:'离职时间',format : 'Y-m-d',allowBlank:true,},
		       {xtype:'textfield',name:'position',fieldLabel:'职位',},		       
		       {xtype:'datefield',name:'rtime',fieldLabel:'转正时间',format : 'Y-m-d',allowBlank:true,},
		]
		},
	buttons:[{
		text:'保存',action:'save'
	}],	
})


